home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c't freeware shareware 2001 January
/
CT_SW0101.ISO
/
pc
/
software
/
office
/
datenbk
/
valentin.sit
/
Valentina_PPC
/
more examples
/
Example for OpenForm
/
Create
next >
Wrap
Text File
|
1999-10-22
|
2KB
|
58 lines
Create()
AddRecords()
----------------------------------------------------------------------------
on Create()
tell application "Valentina (PPC)"
set theDB to make new database with data file "GuestBook"
tell theDB
set Customer to make new base object with properties {name:"Guests"} at end
tell Customer
make new field with properties {name:"Name", type:tString, length:30} at end
make new field with properties {name:"Company", type:tString, length:50} at end
make new field with properties {name:"Email", type:tString, length:20} at end
make new field with properties {name:"Comment", type:tString, length:80} at end
make new field with properties {name:"Number", type:tUlong} at end
make new field with properties {name:"Letter", type:tText, block size:1024} at end
end tell
end tell
end tell
end Create
----------------------------------------------------------------------------
-- Use Event Log window to see events end results.
--
on AddRecords()
set theText to "Valentina is an extremely fast database engine for MacOS.
(see benchmarks at <http://www.paradigmasoft.com> ).
Valentina is scriptable DBMS, which opens a power of
Valentina's engine to the Apple Script users.
Versions for PPC and 68K processors are available.
Until you register your copy the modal dialog will
appear on each database open."
tell application "Valentina (PPC)"
set DB to database "GuestBook"
set Guests to base object "Guests" of DB
repeat with i from 1 to 5
make new record with data {"aaa", "bbb", "dDDD", "tttt", 45, theText} at end of Guests
end repeat
close DB
end tell
end AddRecords